{// 引入标签库 }
<tagLib name="html" />
<include file="Public:header" />
<PHP>

    function get_is_site_repay($id)
    {
    	return l("IS_SITE_REPAY_".$id);
    }
    function get_user_name_by_id($id)
    {
    	return M("user")->where(" id=".$id)->getField("user_name");
    }
    function get_has_repay($id)
    {
    	return l("HAS_REPAY_".$id);
    }
    function get_repay_status($id)
    {
    	return l("REPAY_STATUS_".$id);
    }
	function get_deal_name($deal_id)
    {
    	if($deal_id)
    		return M("deal")->where(" id=".$deal_id)->getField("name");
    }
	
</php>
<load href='__TMPL__Common/js/jquery.bgiframe.js' />
<load href='__TMPL__Common/js/jquery.weebox.js' />
<load href='__TMPL__Common/style/weebox.css' />
<script type="text/javascript" src="__TMPL__Common/js/calendar/calendar.php?lang=zh-cn" ></script>
<load href='__TMPL__Common/js/calendar/calendar.css' />
<load href='__TMPL__Common/js/calendar/calendar.js' />
<div class="main">
<div class="main_title">{%P_TRANSFER_RELATION_TITLE}
	<a href="{:u("IpsTransfer/index")}" class="back_list">{%BACK_LIST}</a>
</div>
<div class="blank5"></div>
<form name="search" action="__APP__" method="get">	
<div class="button_row">
	
	
	<if condition="!$_REQUEST['referer']">
	<input type="button" class="button" value="{%EXPORT}" onclick="m_export_csv('relation_');" />
	</if>
</div>
<div class="blank5"></div>
<div class="search_row">

        {%REPAY_STATUS}：<select name="status">
				<option value="-1" <if condition="intval($_REQUEST['status']) eq -1 || $_REQUEST['status'] eq ''">selected="selected"</if>>{%ALL}</option>
				<option value="0" <if condition="$_REQUEST['status'] eq '0'">selected="selected"</if>>{%REPAY_STATUS_0}</option>
				<option value="1" <if condition="$_REQUEST['status'] eq '1'">selected="selected"</if>>{%REPAY_STATUS_1}</option>	
                <option value="2" <if condition="$_REQUEST['status'] eq '2'">selected="selected"</if>>{%REPAY_STATUS_2}</option>
				<option value="3" <if condition="$_REQUEST['status'] eq '3'">selected="selected"</if>>{%REPAY_STATUS_3}</option>		
		</select>
        
        {%IS_SITE_REPAY}：<select name="is_site_repay">
				<option value="-1" <if condition="intval($_REQUEST['is_site_repay']) eq -1 || $_REQUEST['is_site_repay'] eq ''">selected="selected"</if>>{%ALL}</option>
				<option value="0" <if condition="$_REQUEST['is_site_repay'] eq '0'">selected="selected"</if>>{%IS_SITE_REPAY_0}</option>
				<option value="1" <if condition="$_REQUEST['is_site_repay'] eq '1'">selected="selected"</if>>{%IS_SITE_REPAY_1}</option>	
                <option value="2" <if condition="$_REQUEST['is_site_repay'] eq '2'">selected="selected"</if>>{%IS_SITE_REPAY_2}</option>	
		</select>
        
        
        {%HAS_REPAY}：<select name="has_repay">
				<option value="-1" <if condition="intval($_REQUEST['has_repay']) eq -1 || $_REQUEST['has_repay'] eq ''">selected="selected"</if>>{%ALL}</option>
				<option value="0" <if condition="$_REQUEST['has_repay'] eq '0'">selected="selected"</if>>{%HAS_REPAY_0}</option>
				<option value="1" <if condition="$_REQUEST['has_repay'] eq '1'">selected="selected"</if>>{%HAS_REPAY_1}</option>
                <option value="2" <if condition="$_REQUEST['has_repay'] eq '2'">selected="selected"</if>>{%HAS_REPAY_2}</option>	
		</select>
        
		<input type="hidden" value="IpsTransfer" name="m" />
		<input type="hidden" value="relation_list" name="a" />
        <input type="hidden" value="{$id}" name="id" />
		<input type="submit" class="button" value="{%SEARCH}" />

</div>
</form>
<div class="blank5"></div>
<html:list 
	id="dataTable" 
	style="dataTable" 
	name="repayment" 
	checkbox="true" 
	datasource="list" 
    pk = "mid"
	show="deal_id|get_deal_name:{%DEAL_NAME}
         ,self_money:{%SELF_MONEY}
         ,repay_money:{%REPAY_MONEY}
         ,manage_money:{%MANAGE_MONEY}
		 ,impose_money:{%IMPOSE_MONEY}
		 ,repay_time|to_date='Y-m-d':{%RELATION_REPAY_TIME}
		 ,true_repay_time|to_date:{%TRUE_REPAY_TIME}
		 ,status|get_repay_status:{%REPAY_STATUS}
         ,is_site_repay|get_is_site_repay:{%IS_SITE_REPAY}
         ,l_key:{%L_KEY}
         ,u_key:{%U_KEY}
         ,has_repay|get_has_repay:{%HAS_REPAY}
         ,repay_manage_money:{%REPAY_MANAGE_MONEY}|71
         ,repay_manage_impose_money:{%REPAY_MANAGE_IMPOSE_MONEY}|71
         ,user_name:{%RELATION_USER_NAME}
         ,t_user_name:{%RELATION_T_USER_NAME}
         "         
	 /> 

<div class="blank5"></div>
<div class="page">{$page}</div>
</div>
<include file="Public:footer" />